package api_test

import (
	"gitee.com/kristas/booting-go/framework"
	"gitee.com/kristas/booting-go/framework/core/statement/types"
	"gitee.com/kristas/booting-go/framework/web/rest"
)

func init() {
	framework.Component(new(TestAApi), new(TestData))
}

type TestData struct {
	types.Component `name:"test_data"`
	Value           string
}

type TestAApi struct {
	types.Controller `group:"/test/a"`
	TestData         *TestData `wire:"test_data"`
	set              rest.GET  `url:"/set" param:"val query"`
}

func (a *TestAApi) Set(val string) string {
	a.TestData.Value = val
	return ""
}
